<include file="Public:header" />
<script type="text/javascript" src="/Public/Js/step-jquery-dc/step-jquery-dc.js"></script>
<link rel="stylesheet" href="/Public/Js/step-jquery-dc/css/step-dc-style1.css" />

<link rel="stylesheet" type="text/css" href="__PUBLIC__/Js/poshytip/tip-yellow/tip-yellow.css" />
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Js/poshytip/tip-yellowsimple/tip-yellowsimple.css" />
<script type="text/javascript" src="__PUBLIC__/Js/poshytip/jquery.poshytip.min.js"></script>
<style type="text/css">
.bg-color{ background-color: #92D050; color: #FF0000;  }
.hide { display: none; }
.sign_class th{ color: blue }

/* .step_context li { width: 165px; } */

</style>
<form name="myform" id="myform" method="POST" action=""  enctype="multipart/form-data">
	<input name="data[id]" id="client_id" type="hidden" value="{$info['id']}">
	<input name="data[user_id]" id="user_id" type="hidden" value="{$info['user_id']}">

  <fieldset>
    <legend>个人信息</legend>
    <table class="table_form" width="100%" cellspacing="0">
      <tbody style="" >
        <tr style="height:32px; overflow: hidden; ">
          <th width="120">姓名：</th>
          <td >
            <input type="text" name="data[name]" id="name" size="20"  value="{$info.name}" class="input-text"  />
            <!-- <notempty name="info.photo">
              <img src="{$info.photo}" height="32" width="32" style="position: relative; top:-10px; left:320px;  "  />
            </notempty> -->
          </td>
        </tr>
        <tr>
          <th width="120">性别：</th>
          <td>
            <label><input name="sex" type="radio" value="1" checked="checked" >&nbsp;男&nbsp;&nbsp;</label>
            <label><input name="sex" type="radio" value="0" <eq name="info.sex" value="0"> checked </eq> >&nbsp;女</label>
            <span style="margin-left:135px;">民族：</span>
            <input type="text" name="data[race]" id="race" size="20"  value="{$info.race|default='汉'}" class="input-text" style="width:105px;"  />
            <!-- <span style="margin-left:40px;">个人照片：</span>
            <input type="file" name="file" style="width:140px;"  /> -->
          </td>
        </tr>


        <tr class="sign_class" style="display:none;">
          <th>身份证号码：</th>
          <td>
            <input type="text" name="data[idcard]" id="idcard" value="{$info.idcard}" class="input-text" style="width:125px;" />

            <span style="margin-left:20px; color: blue; ">护照号：</span>
            <input type="text" name="data[passport]" id="passport" value="{$info.passport}" class="input-text"  />
            <!-- <span style="margin-left:20px;">出生日期：</span>
            <select name="year" id="sel_year" rel="{$info.year|default='2016'}" ></select>年
            <select name="month" id="sel_month" rel="{$info.month|default='01'}" ></select>月
            <select name="day" id="sel_day" rel="{$info.day|default='01'}" > </select>日 -->
          </td>
        </tr>

        <tr>
          <th>学历：</th>
          <td>
            <select name="data[xueli]" id="xueli" style="width:120px;">
              <volist name=":xueliArr('')" id="vo">
                <option value="{$vo.id}" <eq name="info['xueli']" value="$vo.id"> selected="" </eq> >{$vo.name}</option>
              </volist>
            </select>
            <a href="javascript:openWinBox('__APP__/Classify/add2/pid/1','添加分类',650,450);"  class="red">+</a>

            <span style="margin-left:10px;">韩语等级：</span>
              <select name="data[hanyu]" id="hanyu">
                <volist name=":hanyuArr('')" id="vo">
                  <option value="{$vo.id}" <eq name="info['hanyu']" value="$vo.id"> selected="" </eq> >{$vo.name}</option>
                </volist>
              </select>
              <a href="javascript:openWinBox('__APP__/Classify/add2/pid/2','添加分类',650,450);"  class="red">+</a>
          </td>
        </tr>

        <tr>
          <th>签证类型：</th>
          <td>
            <select name="data[visa_type]" id="visa_type"  style="width:120px;">
              <volist name=":signArr('')" id="vo">
                  <option value="{$vo.id}" <eq name="info['visa_type']" value="$vo.id"> selected="" </eq> >{$vo.name}</option>
                </volist>
            </select>
            <a href="javascript:openWinBox('__APP__/Classify/add2/pid/3','添加分类',650,450);"  class="red">+</a>

            <span style="margin-left:10px;">顾问老师：</span>
              <select name="data[lianxiren]" id="lianxiren">
                <option value="0">请选择顾问老师</option>
                <volist name="lianxi_list" id="vo">
                  <option value="{$vo.id}" {$lianxirenOption[$vo['id']]} >{$vo.name}</option>
                </volist>
            </select>
            &nbsp;&nbsp;
            <a href="javascript:openWinBox('__APP__/lianxi/add','添加顾问老师',650,450);"  class="red">添加顾问老师</a>
          </td>
        </tr>

        <tr>
          <th>地区：</th>
          <td>
            <select name="data[province]" id="province"  style="width:120px;">
              <option value="0">请选择所属省份</option>
                <volist name=":provinceList()" id="vo">
                  <option value="{$vo.id}"  >{$vo.name}</option>
                </volist>
            </select>
            <span style="margin-left:20px;">所属城市：</span>
            <select name="data[city]" id="city" style="width: 120px;">
              <option value="0">请选择所属城市</option>
                <volist name=":cityList($info['province'])" id="vo">
                  <option value="{$vo.id}" >{$vo.name}</option>
                </volist>
            </select>
            <span style="margin-left:20px;">所属区域：</span>
            <select name="data[area]" id="area"  style="width:120px;">
              <option value="0">请选择所属区域</option>
                <volist name=":areaList($info['city'])" id="vo">
                  <option value="{$vo.id}"  >{$vo.name}</option>
                </volist>
            </select>
          </td>
        </tr>
        <tr  class="last " >
          <th>计划申请时间：</th>
          <td>
            <select name="data[apply_time]" id="apply_time"  >
              <option value="0">请选择申请时间</option>
                <volist name=":applyTimeArr()" id="vo">
                  <option value="{$vo.id}" <eq name="info['apply_time']" value="$vo.id"> selected="" </eq> >{$vo.name}</option>
                </volist>
            </select>
            <a href="javascript:openWinBox('__APP__/Classify/add2/pid/51','添加分类',650,450);"  class="red">+</a>
          </td>
        </tr>


      </tbody>
    </table>
  </fieldset>
  <fieldset>
    <legend>联系方式</legend>
    <table class="table_form" width="100%" cellspacing="0">
      <tbody>
        <tr>
          <th width="120">QQ：</th>
          <td>
            <input type="text" name="data[qq]" id="qq" size="20"  value="{$info.qq}" class="input-text" style="width:120px;" />
            <span style="margin-left:20px;">国内手机：</span>
            <input type="text" name="data[phone]" id="phone" size="20"  value="{$info.phone}" class="input-text" style="width:120px;" />
          </td>
        </tr>
        <tr class="last">
          <th width="120">微信：</th>
          <td>
            <input type="text" name="data[wechat]" id="wechat" size="20"  value="{$info.wechat}" class="input-text" style="width:120px;" />
            <span style="margin-left:20px; display:none;"  class="sign_class" >韩国手机：</span>
            <input type="text" name="data[phone_korea]" id="phone_korea" size="20"  value="{$info.phone_korea}" class="input-text sign_class" style="width:120px; display:none;" />

          </td>
        </tr>
      </tbody>
    </table>
  </fieldset>
  <fieldset>
    <legend>处理进度</legend>
    <table class="table_form" width="100%" cellspacing="0">
      <tbody>
        <tr>
          <th width="120">处理状态：</th>
          <td>
            <label><input name="data[sign_status]" class="sign_status" type="radio" value="0" checked="checked" >&nbsp;正在洽谈</label>
          <label><input name="data[sign_status]" class="sign_status" type="radio" value="1"  <eq name="info.sign_status" value="1"  > checked </eq>  >&nbsp;<span style="color:blue;">已经签约</span>&nbsp;&nbsp;</label>
          </td>
        </tr>
        <tr>
          <th width="120">学生来源：</th>
          <td>
            <select name="data[source]" id="source">
              <volist name=":laiyuanArr()" id="vo">
                <option value="{$vo.id}"  <eq name="info['source']" value="$vo.id"> selected="" </eq> >{$vo.name}</option>
              </volist>
            </select>
            <a href="javascript:openWinBox('__APP__/Classify/add2/pid/7','添加分类',650,450);"  class="red">+</a>
          </td>
        </tr>
        <tr  class="last">
          <th width="120">跟踪处理：</th>
          <td>
            <input type="hidden" name="data[process]" id="process" value="{$info.process}">
            <input type="hidden" id="process0" value="{$info.process}">
            <div class="step_context current_status" style="height:100px;"></div>
          </td>
        </tr>
      </tbody>
    </table>
  </fieldset>
  <fieldset  >
    <legend>大学选择</legend>
    <table class="table_form" width="100%" cellspacing="0">
      <tbody>
        <tr>
          <th width="120">大学选择1：</th>
          <td>
            <select name="data[university_one]" id="university_one">
              <option value="0">请选择大学</option>
                <volist name=":daxueArr()" id="vo">
                  <option value="{$vo.id}"  <eq name="info['university_one']" value="$vo.id"> selected="" </eq>  >{$vo.name}</option>
                </volist>
            </select>
            <a href="javascript:openWinBox('__APP__/Daxue/add2','添加大学',700,450);"  class="red">+</a>

            <span style="margin-left:20px; display:none;" class="visa_type_class">大学选择1专业：</span>
            <input type="text" name="data[major_one]" id="major_one" size="20"  value="{$info.major_one}" class="input-text visa_type_class" style="width:140px; display:none;" />
          </td>
        </tr>
        <tr style="display:none;" class="university_two">
          <th width="120">大学选择2：</th>
          <td>
            <select name="data[university_two]" id="university_two">
              <option value="0">请选择大学</option>
                <volist name=":daxueArr()" id="vo">
                <option value="{$vo.id}"  <eq name="info['university_two']" value="$vo.id"> selected="" </eq>  >{$vo.name}</option>
                </volist>
            </select>
            <a href="javascript:openWinBox('__APP__/Daxue/add2','添加大学',700,450);"  class="red">+</a>

            <span style="margin-left:20px;">大学选择1专业：</span>
            <input type="text" name="data[major_two]" id="major_two" size="20"  value="{$info.major_two}" class="input-text" style="width:140px;" />
          </td>
        </tr>
        <tr class="last university_three" style="display:none;">
          <th width="120">大学选择3：</th>
          <td>
            <select name="data[university_three]" id="university_three">
              <option value="0">请选择大学</option>
                <volist name=":daxueArr()" id="vo">
                <option value="{$vo.id}"  <eq name="info['university_three']" value="$vo.id"> selected="" </eq>  >{$vo.name}</option>
                </volist>
            </select>
            <a href="javascript:openWinBox('__APP__/Daxue/add2','添加大学',700,450);"  class="red">+</a>

            <span style="margin-left:20px;">大学选择1专业：</span>
            <input type="text" name="data[major_three]" id="major_three" size="20"  value="{$info.major_three}" class="input-text" style="width:140px;" />
          </td>
        </tr>
      </tbody>
    </table>
  </fieldset>
  <fieldset class="sign_class"   style="display:none">
    <legend>签约信息</legend>
    <table class="table_form" width="100%" cellspacing="0">
      <tbody>
        <tr>
          <th width="120">签约时间：</th>
          <td>
            <input type="text" name="data[time_sign]" id="time_sign" size="20"  value="{$info.time_sign}" class="input-text Wdate" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" readonly="readonly" style="width:80px;"  />

            <span style="margin-left:20px;">入境时间：</span>
            <input type="text" name="data[time_enter]" id="time_enter" size="20"  value="{$info.time_enter}"  class="input-text Wdate" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" readonly="readonly" style="width:80px;"/>

            <span style="margin-left:20px;">签证邮寄时间：</span>
            <input type="text" name="data[time_send]" id="time_send" size="20"  value="{$info.time_send}"  class="input-text Wdate" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" readonly="readonly" style="width:80px;"/>

          </td>
        </tr>
        <tr >
          <th width="120">签证负责人：</th>
          <td>
            <select name="data[duijiecompany]" id="duijiecompany">
              <option value="0">请选择负责人</option>
              <volist name="duijie_list" id="vo">
                <option value="{$vo.id}" {$duijiecompanyOption[$vo['id']]} >{$vo.name}</option>
              </volist>
          </select>
          &nbsp;&nbsp;
            <a href="javascript:openWinBox('__APP__/duijie/add','添加负责人',650,450);"  class="red">添加负责人</a>


          </td>
        </tr>
        <tr >
          <th width="120">签证邮递人：</th>
          <td>
            <input type="text" name="data[send_name]" id="send_name" size="20"  value="{$info.send_name}" class="input-text" style="width:220px;" />
          </td>
        </tr>
        <tr  class="last">
          <th width="120">合同类型：</th>
          <td>
            <select name="data[contract_type]" id="contract_type">
              <volist name=":hetongArr()" id="vo">
                <option value="{$vo.id}"  <eq name="info['contract_type']" value="$vo.id"> selected="" </eq>  >{$vo.name}</option>
              </volist>
            </select>
            <a href="javascript:openWinBox('__APP__/Classify/add2/pid/5','添加分类',650,450);"  class="red">+</a>
            <span style="margin-left:20px;">合同编号：</span>
            <input type="text" name="data[contract_num]" id="contract_num" size="20"  value="{$info.contract_num}" class="input-text" style="width:220px;" />

          </td>
        </tr>

      </tbody>
    </table>
  </fieldset>

  <!-- 服务费用  -->
  <fieldset class="sign_class"   style="display:none">
    <legend>服务费用</legend>
    <table class="table_form" width="100%" cellspacing="0">
      <tbody>
        <tr>
          <th width="120">中介费首款数额：</th>
          <td>
            <input type="text" name="data[price_start]" id="price_start" size="20"  value="{$info.price_start}" class="input-text" style="width:60px;" />

            <span style="margin-left:10px;">缴纳时间：</span>
            <input type="text" name="data[price_start_time]" id="price_start_time" size="20"  value="{$info.price_start_time}"  class="input-text Wdate" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm'})" readonly="readonly" style="width:120px;" />

            <span style="margin-left:10px;">交费渠道：</span>
            <select name="data[price_start_qudao]" id="price_start_qudao">
              <volist name=":qudaoArr()" id="vo">
                <option value="{$vo.id}"  <eq name="info['price_start_qudao']" value="$vo.id"> selected="" </eq>  >{$vo.name}</option>
              </volist>
            </select>
            <a href="javascript:openWinBox('__APP__/Classify/add2/pid/6','添加渠道',650,450);"  class="red">+</a>

            <input name="price_start_img" class="upimg price_start_img" type="file" value="上传图片" style="margin-left:10px; width: 60px;">
            <span class="onShow onCorrect" style="height: 22px; width: 22px; padding: 2px 0px 2px 2px; display: none;"></span>
            <notempty name="info.price_start_img">
              <img src="{$info.price_start_img}" height="22" width="22" onMouseOver="toolTip('<img src={$info.price_start_img}>')" onMouseOut="toolTip()">
            </notempty>
          </td>
        </tr>
        <tr >
          <th width="120">中介费尾款数额：</th>
          <td>
            <input type="text" name="data[price_end]" id="price_end" size="20"  value="{$info.price_end}" class="input-text" style="width:60px;" />

            <span style="margin-left:10px;">缴纳时间：</span>
            <input type="text" name="data[price_end_time]" id="price_end_time" size="20"  value="{$info.price_end_time}"  class="input-text Wdate" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm'})" readonly="readonly" style="width:120px;" />

            <span style="margin-left:10px;">交费渠道：</span>
            <select name="data[price_end_qudao]" id="price_end_qudao">
              <volist name=":qudaoArr()" id="vo">
                <option value="{$vo.id}"  <eq name="info['price_end_qudao']" value="$vo.id"> selected="" </eq>  >{$vo.name}</option>
              </volist>
            </select>
            <a href="javascript:openWinBox('__APP__/Classify/add2/pid/6','添加渠道',650,450);"  class="red">+</a>

            <input name="price_end_img" class="upimg price_end_img" type="file" value="上传图片" style="margin-left:10px; width: 60px;">
            <span class="onShow onCorrect" style="height: 22px; width: 22px; padding: 2px 0px 2px 2px; display: none;"></span>
            <notempty name="info.price_end_img">
              <img src="{$info.price_end_img}" height="22" width="22" onMouseOver="toolTip('<img src={$info.price_end_img}>')" onMouseOut="toolTip()">
            </notempty>

          </td>
        </tr>

         <tr class="last" >
          <th width="120">境外服务费数额：</th>
          <td>

            <input type="text" name="data[price_service]" id="price_service" size="20"  value="{$info.price_service}" class="input-text" style="width:60px;" />

            <span style="margin-left:10px;">缴纳时间：</span>
            <input type="text" name="data[price_service_time]" id="price_service_time" size="20"  value="{$info.price_service_time}"  class="input-text Wdate" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm'})" readonly="readonly" style="width:120px;" />

            <span style="margin-left:10px;">交费渠道：</span>
            <select name="data[price_service_qudao]" id="price_service_qudao">
              <volist name=":qudaoArr()" id="vo">
                <option value="{$vo.id}"  <eq name="info['price_service_qudao']" value="$vo.id"> selected="" </eq>  >{$vo.name}</option>
              </volist>
            </select>
            <a href="javascript:openWinBox('__APP__/Classify/add2/pid/6','添加渠道',650,450);"  class="red">+</a>

            <input name="price_service_img" class="upimg price_service_img" type="file" value="上传图片" style="margin-left:10px; width: 60px;">
            <span class="onShow onCorrect" style="height: 22px; width: 22px; padding: 2px 0px 2px 2px; display: none;"></span>
            <notempty name="info.price_service_img">
              <img src="{$info.price_service_img}" height="22" width="22" onMouseOver="toolTip('<img src={$info.price_service_img}>')" onMouseOut="toolTip()">
            </notempty>

          </td>
        </tr>
      </tbody>
    </table>
  </fieldset>
  <fieldset class="sign_class"  style="display:none">
    <legend>其他费用</legend>
    <table class="table_form" width="100%" cellspacing="0">
      <tbody>
        <tr>
          <th width="120">签证费数额：</th>
          <td>
            <input type="text" name="data[price_sign]" id="price_sign" size="20"  value="{$info.price_sign}" class="input-text" style="width:60px;" />

            <span style="margin-left:10px;">缴纳时间：</span>
            <input type="text" name="data[price_sign_time]" id="price_sign_time" size="20"  value="{$info.price_sign_time}"  class="input-text Wdate" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm'})" readonly="readonly" style="width:120px;" />

            <span style="margin-left:10px;">交费渠道：</span>
            <select name="data[price_sign_qudao]" id="price_sign_qudao">
              <volist name=":qudaoArr()" id="vo">
                <option value="{$vo.id}"  <eq name="info['price_sign_qudao']" value="$vo.id"> selected="" </eq>  >{$vo.name}</option>
              </volist>
            </select>
            <a href="javascript:openWinBox('__APP__/Classify/add2/pid/6','添加渠道',650,450);"  class="red">+</a>

            <input name="price_sign_img" class="upimg price_sign_img" type="file" value="上传图片" style="margin-left:10px; width: 60px;">
            <span class="onShow onCorrect" style="height: 22px; width: 22px; padding: 2px 0px 2px 2px; display: none;"></span>
            <notempty name="info.price_sign_img">
              <img src="{$info.price_sign_img}" height="22" width="22" onMouseOver="toolTip('<img src={$info.price_sign_img}>')" onMouseOut="toolTip()">
            </notempty>

          </td>
        </tr>
        <tr >
          <th width="120">学历认证费：</th>
          <td>
            <input type="text" name="data[price_renzheng]" id="price_renzheng" size="20"  value="{$info.price_renzheng}" class="input-text" style="width:60px;" />

            <span style="margin-left:10px;">缴纳时间：</span>
            <input type="text" name="data[price_renzheng_time]" id="price_renzheng_time" size="20"  value="{$info.price_renzheng_time}"  class="input-text Wdate" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm'})" readonly="readonly" style="width:120px;" />

            <span style="margin-left:10px;">交费渠道：</span>
            <select name="data[price_renzheng_qudao]" id="price_renzheng_qudao">
              <volist name=":qudaoArr()" id="vo">
                <option value="{$vo.id}"  <eq name="info['price_renzheng_qudao']" value="$vo.id"> selected="" </eq>  >{$vo.name}</option>
              </volist>
            </select>
            <a href="javascript:openWinBox('__APP__/Classify/add2/pid/6','添加渠道',650,450);"  class="red">+</a>

            <input name="price_renzheng_img" class="upimg price_renzheng_img" type="file" value="上传图片" style="margin-left:10px; width: 60px;">
            <span class="onShow onCorrect" style="height: 22px; width: 22px; padding: 2px 0px 2px 2px; display: none;"></span>
            <notempty name="info.price_renzheng_img">
              <img src="{$info.price_renzheng_img}" height="22" width="22" onMouseOver="toolTip('<img src={$info.price_renzheng_img}>')" onMouseOut="toolTip()">
            </notempty>


          </td>
        </tr>
        <tr >
          <th width="120">其他公证和认证：</th>
          <td>
            <input type="text" name="data[price_qita_name]" id="price_qita_name" size="20"  value="{$info.price_qita_name}" class="input-text" style="width:60px;" />
          </td>
        </tr>
         <tr  class="last" >
          <th width="120">认证费用：</th>
          <td>
            <input type="text" name="data[price_qita]" id="price_qita" size="20"  value="{$info.price_qita}" class="input-text" style="width:60px;" />

            <span style="margin-left:10px;">缴纳时间：</span>
            <input type="text" name="data[price_qita_time]" id="price_qita_time" size="20"  value="{$info.price_qita_time}"  class="input-text Wdate" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm'})" readonly="readonly" style="width:120px;" />

            <span style="margin-left:10px;">交费渠道：</span>
            <select name="data[price_qita_qudao]" id="price_qita_qudao">
              <volist name=":qudaoArr()" id="vo">
                <option value="{$vo.id}"  <eq name="info['price_qita_qudao']" value="$vo.id"> selected="" </eq>  >{$vo.name}</option>
              </volist>
            </select>
            <a href="javascript:openWinBox('__APP__/Classify/add2/pid/6','添加渠道',650,450);"  class="red">+</a>

            <input name="price_qita_img" class="upimg price_qita_img" type="file" value="上传图片" style="margin-left:10px; width: 60px;">
            <span class="onShow onCorrect" style="height: 22px; width: 22px; padding: 2px 0px 2px 2px; display: none;"></span>
            <notempty name="info.price_qita_img">
              <img src="{$info.price_qita_img}" height="22" width="22" onMouseOver="toolTip('<img src={$info.price_qita_img}>')" onMouseOut="toolTip()">
            </notempty>

          </td>
        </tr>


      </tbody>
    </table>
  </fieldset>
  <input type="submit" value="提交" class="dialog" id="dosubmit">
</form>
</body>
</html>
<script type="text/javascript" src="/Public/Js/ueditor/ueditor.config.js"></script>	<!--ueditor编辑器-->
<script type="text/javascript" src="/Public/Js/ueditor/ueditor.all.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/Js/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/ToolTip.js"></script>
<script type="text/javascript">
function show_university(){
  var visa_type = $("#visa_type").val();
  var university_one = $("#university_one").val();
  var major_one = $("#major_one").val();
  var university_two = $("#university_two").val();
  var major_two = $("#major_two").val();
  var university_two = $("#university_two").val();
  var major_two = $("#major_two").val();

  if(visa_type==25||visa_type==26){
    $(".visa_type_class").show();
    if(university_one!=0 && major_one!=''){
      $(".university_two").show();
      if(university_two!=0 && major_two!=''){
        $(".university_three").show();
      }else{
        $(".university_three").hide();
      }
    }else{
      $(".university_two").hide();
      $(".university_three").hide();
    }
  }else{
    $(".visa_type_class").hide();
    $(".university_three").hide();
    $(".university_two").hide();
  }
}

function sign_action(){
  var sign_status = $("input[name='data[sign_status]']:checked").val();
  if(sign_status==1){
    $(".sign_class").show();
    //$(".current_status:li").first().addClass('firstFinshStep');
    //var a =$(".current_status li").last().find('a').trigger("click");
  }else{
    $(".sign_class").hide();
  }
}

$(function(){
  //获取身份证
  var idcard = $("#idcard").val();
  var year=idcard.substring(6,10);
  var month=idcard.substring(10,12);
  var day=idcard.substring(12,14);

  if(year==''||year==0){
      year = 2016;
  }
  if(month==''||month==0){
      month = 01;
  }
  if(day==''||day==0){
      day = 01;
  }
  $("#sel_year").attr('rel',year);
  $("#sel_month").attr('rel',month);
  $("#sel_day").attr('rel',day);


  //根据签约状态显示相应的信息
  sign_action();

  $(".sign_status").change(function(){
    sign_action();
  })

  // 根据选择签约类型，获取相应的大学的列表
  show_university();


  $("#visa_type").change(function(){
    show_university();
  })

  //根据选择的大学和填写大学专业 显示隐藏下一个


  $("#university_one").change(function(){
    show_university();
  })

  $("#major_one").focusout(function(){
    show_university();
  })

  $("#university_two").change(function(){
    show_university();
  })

  $("#major_two").focusout(function(){
    show_university();
  })


  $("#idcard").change(function(){
    var idcard = $(this).val();
    var reg = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;
    if(reg.test(idcard) === false) {
        alert("身份证输入不合法");
        return  false;
    }else{
      var idcard = $("#idcard").val();
      var year=idcard.substring(6,10);
      var month=idcard.substring(10,12);
      var day=idcard.substring(12,14);

      $("#sel_year").val(year);
      $("#sel_month").val(parseInt(month));
      $("#sel_day").val(parseInt(day));
    }
  })


  $(".upimg").change(function(event) {
    $(this).next('span').show();
    $(this).next('span').next('img').hide();
  });

  $('.category-help').poshytip({
    className: 'tip-yellowsimple',
    showTimeout: 0.5,alignX: 'center',
    offsetY: 0,
    allowTipHover: true,
    content:'1.非客户：没有买房意向的客户；<br>2.潜在客户：想买房，但目前没有能力或者暂时没打算买房的客户；<br>3.目标客户：有坚定的买房意向，而且已经有买房的能力和想法；<br>4.流失客户：客户已经被别的公司或者其他同行邀约；<br>5.现实：已经达成交易或已经购买的客户。'
  });

  $('.yixiang-help').poshytip({
    className: 'tip-yellowsimple',
    showTimeout: 0.5,alignX: 'center',
    offsetY: 0,
    allowTipHover: true,
    content: 'A类:行动客户，已经看房或将要看房客户;<br> B类:兴趣意向，对某个楼盘感兴趣，或者想看房; <br>C类:一般意向，不着急买房，只是对比有好的再下手; <br> D类:没有意向,直接挂断或没兴趣。 '
  });



	var province = "{$info.province}";
	$("#province").val(province);

	var city = "{$info.city}";
	$("#city").val(city);

	var area = "{$info.area}";
	$("#area").val(area);

	$('#myform').ajaxForm({
		beforeSubmit:  checkForm,
		success:       complete,
		dataType: 'json'
	});

	function checkForm(){
		var name = $("#name").val();
		var phone = $("#phone").val();
		var content = $("#content").val();
		if(name==''){
			msg('联系人不能为空！',0);
			$('#name').focus();
			return false;
		}
		if(phone==''){
			msg('电话号码不能为空！',0);
			$('#phone').focus();
			return false;
		}
		return true;
	}
	var origin = $.artDialog.open.origin;
    function complete(data){
    	msg(data.info,data.status);
		if(data.status) setTimeout(function(){origin.location.reload();},1000);
    }


	$(".linkmanInfo").hide();
	$("#search").click(function(){
		var keyword = $("#keyword").val();
		$("#linkmanList").empty();
		$.get("__URL__/getContacts", { keyword: keyword},function(data){
			$("#linkmanList").append("<option value=\"0\">请选择联系人</option>");
			var list = data.data;
			jQuery.each(list, function(i,val) {
					$("#linkmanList").append("<option value=\""+val.id+"\">"+val.name+"("+val.phone+")</option>");
			});
	   });
	})

	$("#linkmanList").change(function(){
		var id = $(this).val();
		$(".linkmanInfo").show();
		$.get("__URL__/getContactsInfo", { id: id},function(data){
			var info = data.data;
			$("#name").text(info.name);
			$("#sex").text(info.sexName);
			$("#phone").text(info.phone);
			$("#tel").text(info.tel);
			$("#address").text(info.address);

			$("#name").next("input").val(info.name);
			$("#sex").next("input").val(info.sex);
			$("#phone").next("input").val(info.phone);
			$("#tel").next("input").val(info.tel);
			$("#address").next("input").val(info.address);
	   });
	})

  //联系人
  $('#lianxiren').live('change', function() {
    var lianxiren = $('#lianxiren :selected').val();
    var href='__APP__/Lianxi/getInfoAjax/randNum/'+Math.random();

    if(lianxiren==0){
      $(".lianxiren-info").hide();
    }else{
      $(".lianxiren-info").show();
    }

    jQuery.ajax({
      type:'GET',
      url:href,
      dataType:'text',
      data:encodeURI('id='+lianxiren),
      error: function(){ //如果出错，执行函数
        alert('Error loading XML document');
      },
      success:function(data){
        var jsondata = eval("("+ data+")");
        var status = jsondata.status;
        var info = jsondata.data;
        $("#lianxiren_name").html(info.name);
        $("#lianxiren_phone").html(info.phone);
        $("#lianxiren_qq").html(info.qq);
        $("#lianxiren_company").html(info.company);
        $("#lianxiren_remark").html(info.remark);
      }
    });
  });

  //对接单位
  $('#duijiecompany').live('change', function() {
    var duijiecompany = $('#duijiecompany :selected').val();
    var href='__APP__/Duijie/getInfoAjax/randNum/'+Math.random();

    if(duijiecompany==0){
      $(".duijiecompany-info").hide();
    }else{
      $(".duijiecompany-info").show();
    }

    jQuery.ajax({
      type:'GET',
      url:href,
      dataType:'text',
      data:encodeURI('id='+duijiecompany),
      error: function(){ //如果出错，执行函数
        alert('Error loading XML document');
      },
      success:function(data){
        var jsondata = eval("("+ data+")");
        var status = jsondata.status;
        var info = jsondata.data;
        $("#duijiecompany_name").html(info.name);
        $("#duijiecompany_phone").html(info.phone);
        $("#duijiecompany_qq").html(info.qq);
        $("#duijiecompany_company").html(info.company);
        $("#duijiecompany_remark").html(info.remark);
      }
    });
  });

})



</script>

<script type="text/javascript" src="/Public/Js/birthday/birthday.js"></script>
<script>
$(function () {
	$.ms_DatePicker({
            YearSelector: ".sel_year",
            MonthSelector: ".sel_month",
            DaySelector: ".sel_day"
    });
	$.ms_DatePicker();

});
</script>

<script type="text/javascript">
$(document).ready(function(){
  $('#province').live('change', function() {
    var provinceName = $('#province :selected').text();
    $("#provinceName").val(provinceName);
    var pid = $("#province option:selected").val();
    var href='__APP__/Area/ajaxCityList/randNum/'+Math.random();
    $("#city").empty();
    $("#area").empty();
    jQuery.ajax({
      type:'GET',
      url:href,
      dataType:'text',
      data:encodeURI('pid='+pid),
      error: function(){ //如果出错，执行函数
        alert('Error loading XML document');
      },
      success:function(data){
        var jsondata = eval("("+ data+")");
        var arrLength = jsondata.data.length;
        jQuery("#city").append("<option value=\"0\">请选择城市</option>");
        for(var i=0; i<arrLength; i++){
          jQuery("#city").append("<option value=\""+jsondata.data[i]['id']+"\">"+jsondata.data[i]['name']+"</option>");
        }
        jQuery("#area").append("<option value=\"0\">请选择区域</option>");
      }
    });
  });

  $('#city').live('change', function() {
    var cityName = $('#city :selected').text();
    $("#cityName").val(cityName);
    var cid = $("#city option:selected").val();
    var href='__APP__/Area/ajaxAreaList/randNum/'+Math.random();
    $("#area").empty();
    jQuery.ajax({
      type:'GET',
      url:href,
      dataType:'text',
      data:encodeURI('cid='+cid),
      success:function(data){
        var jsondata = eval("("+ data+")");
        jQuery("#area").append("<option value=\"0\">"+jsondata.info+"</option>");
        if(jsondata.status!=0){
          var arrLength = jsondata.data.length;
          for(var i=0; i<arrLength; i++){
            jQuery("#area").append("<option value=\""+jsondata.data[i]['id']+"\">"+jsondata.data[i]['name']+"</option>");
          }
        }
      }
    });
  });

  $("#area").change(function(){
    var areaName = $('#area :selected').text();
    $("#areaName").val(areaName);
  })

});


</script>

<script type="text/javascript">
//所有步骤的数据
/*var stepListJson=[{StepNum:1,StepText:"新来电"},
{StepNum:2,StepText:"了解意向"},
{StepNum:3,StepText:"推荐"},
{StepNum:4,StepText:"邀约"},
{StepNum:5,StepText:"邀约成功"},
{StepNum:6,StepText:"邀约成功"},
{StepNum:7,StepText:"邀约成功"},
{StepNum:8,StepText:"成交"}];*/
var stepListJson = {$stepListJson};
var allNum = stepListJson.length;
//当前进行到第几步
var currentStep={$info['process']|default='1'};
//new一个工具类
var StepTool = new Step_Tool_dc("current_status","mycall");
//使用工具对页面绘制相关流程步骤图形显示
StepTool.drawStep(currentStep,stepListJson);
//回调函数
function mycall(restult){
//  alert("mycall"+result.value+":"+result.text);
  if(allNum==result.value){
    $(".sign_status:eq(1)").attr("checked",'checked');
    sign_action();
  }else{
    $(".sign_status:eq(0)").attr("checked",'checked');
    sign_action();
  }
  /*if(result.value<currentStep){
    alert('客户进度只能前进不能后退！');
    return false;
  }*/
  StepTool.drawStep(result.value,stepListJson);
  $("#process").val(result.value);
}
</script>